GCC = g++
CPPFLAGS = -g -finline-functions -Wall -Winline -pipe -DOS_LINUX
HEAD_INFO = -DPROJECT_NAME="\"FASTSEARCH\"" -DDESCRIPTION="\"FastSearch indexer\""
COMMON_PATH=../../../common
FRAME_PATH=../../frame
	  
INCLUDES = -I./ -I../output/include \
		   -I../../index_reader/output/include \
		   -I$(FRAME_PATH)/search_proto/output/include \
           -I$(COMMON_PATH)/commonlib/output/include \
	       -I$(COMMON_PATH)/protobuf/include \
	       -I$(COMMON_PATH)/termindex \
	       -I$(COMMON_PATH)/ictclas/ \
	       -I$(COMMON_PATH)/sign/ 

LIBS     = -L./ -L../output/lib/ -lindex_merger \
		   -L../../index_reader/output/lib/ -lindex_reader \
		   -L$(FRAME_PATH)/search_proto/output/lib/ -lsearchpb   \
		   -L$(COMMON_PATH)/commonlib/output/lib -lcommonlib \
		   -L$(COMMON_PATH)/ictclas/ -lICTCLAS2011 \
	       -L$(COMMON_PATH)/sign/ -lsign \
	       $(COMMON_PATH)/protobuf/lib/libprotobuf.a \
	       -lpthread

all : test_merger


test_merger : test_merger.o 
	$(GCC) -o $@ $^ $(INCLUDES) $(HEAD_INFO) $(LIBS)
%.o : %.cpp
	$(GCC) $(CPPFLAGS) $(HEAD_INFO) -c $< -o $@ $(INCLUDES)

clean :
	rm -f *.o
	rm -rf test_merger

